package com.wn.class30.mapper;

import com.wn.class30.entity.User;
import com.wn.class30.entity.UserExample;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface UserDao {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer userId);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    //常规的多表查询用键值对，Map<String,Object>保存的是一条数据：
    //{address=红旗河沟, sno=101, name=张三, id=1, dept=销售, deptno=1111, dsno=101}
    public List<Map<String,Object>> selectMap(Integer userId);
}